require 'java'

include_class 'picounit.exception.PicoUnitException'

class MissingClassDefinition < PicoUnitException
  def initialize(cause)
    super(cause)
  end
end

class FileNotFound < PicoUnitException
  def initialize(cause)
    super(cause)
  end
end

class InvalidClassName < PicoUnitException
  def initialize(class_name, cause)
    super(class_name, cause)
  end
end

class InvalidDeclaration < PicoUnitException
  def initialize(name, bean, cause)
    super("(name: #{name}, bean: #{bean})", cause)
  end
end

class InvalidExpression < PicoUnitException
  def initialize(context, expression, cause)
    super("#{context}(#{expression})", cause)
  end
end

class InvalidScript < PicoUnitException
  def initialize(context, script, cause)
    super("#{context}:\n#{expression}", cause)
  end
end